package com.orange.common.exception;

import com.orange.common.exception.result.CodeEnum;
import lombok.Getter;

/**
 * @author : kyc
 * @Description: 服务端异常
 * @date : 2021-02-04 11:08
 **/
@Getter
public class ServerException extends OrangeException {

    /**
     * 状态码
     */
    private final CodeEnum codeEnum;

    /**
     * 错误详细信息
     */
    private final String errorMessage;

    public ServerException(String errorMessage) {
        this.codeEnum = CodeEnum.SYSTEM_INNER_ERROR;
        this.errorMessage = errorMessage;
    }

    public ServerException(CodeEnum codeEnum, String errorMessage) {
        this.codeEnum = codeEnum;
        this.errorMessage = errorMessage;
    }
}
